module.exports = {
  // base: '/ts-axios-doc/',
  // dest: 'dist',
  // title: 'TypeScript 从零实现 axios',
  // description: '学习使用 TypeScript 从零实现 axios 库',
  // themeConfig: {
  //   editLinks: false,
  //   docsDir: 'docs',
  //   nav: [],
  configureWebpack: {
    resolve: {
      alias: {
        '@alias': 'path/to/some/dir'
      }
    }
  },
  base: '/',
  dest: 'dist',
  port: 7890,
  head: [['link', { rel: 'icon', href: `/zbt-logo.png` }]],  //浏览器窗口标题
  title: '荣晶TypeScript学习手册',                                        //logo处标题
  description: 'TypeScript是JavaScript类型的超集，它可以编译成纯JavaScript',
  // theme:'foo',
  // evergreen: true,   //浏览器兼容性(browser compatibility)如果只对常青树浏览器，请设置为 true 。这将禁用 IE5 的 ES5 转码和 polyfill，导致更快的构建和更小的文件。
  markdown: {
    externalLinks: { target: '_blank', rel: 'noopener noreferrer' },
    // lineNumbers:true,
  },
  
  themeConfig: {
    docsDir: 'docs',   // 如果你的文档不在仓库的根部
    logo: '/zbt-logo.png',
    // 假定 GitHub。也可以是一个完整的 GitLab 网址
    repo: 'https://github.com/KimGuBa/Learn-Ant-Design-Pro-v4.git',
    docsBranch: 'master', // 可选，默认为 master
    editLinks: true,   // 默认为 true，设置为 false 来禁用

    nav: [
      { text: '首页', link: '/chapter1/' },
      { text: '洲博通官网', link: 'https://www.zbtservices.com/' },
      // {
      //   text: "选择语言", items: [
      //     { text: '中文', items: [/*  */] },
      //     { text: '英语', items: [/*  */] }
      //   ]
      // },
    ],
    sidebar: [
      {
        title: '初识 TypeScript',
        collapsable: false,
        children: [
          ['chapter1/', 'Introduction'],
          'chapter1/install',
          'chapter1/start'
        ]
      },
      {
        title: 'TypeScript 常用语法',
        collapsable: false,
        children: [
          'chapter2/type',
          'chapter2/declare',
          'chapter2/interface',
          'chapter2/class',
          'chapter2/function',
          'chapter2/generic',
          'chapter2/inference',
          'chapter2/advance'
        ]
      },
      {
        'title': 'ts-axios 项目初始化',
        collapsable: false,
        children: [
          'chapter3/require',
          'chapter3/init',
          'chapter3/base'
        ]
      },
      {
        'title': 'ts-axios 基础功能实现',
        collapsable: false,
        children: [
          'chapter4/url',
          'chapter4/data',
          'chapter4/header',
          'chapter4/response',
          'chapter4/response-header',
          'chapter4/response-data'
        ]
      },
      {
        'title': 'ts-axios 异常情况处理',
        collapsable: false,
        children: [
          'chapter5/error',
          'chapter5/enhance'
        ]
      },
      {
        'title': 'ts-axios 接口扩展',
        collapsable: false,
        children: [
          'chapter6/extend',
          'chapter6/overload',
          'chapter6/generic'
        ]
      },
      {
        'title': 'ts-axios 拦截器实现',
        collapsable: false,
        children: [
          'chapter7/interceptor'
        ]
      },
      {
        'title': 'ts-axios 配置化实现',
        collapsable: false,
        children: [
          'chapter8/merge',
          'chapter8/transform',
          'chapter8/create'
        ]
      },
      {
        'title': 'ts-axios 取消功能实现',
        collapsable: false,
        children: [
          'chapter9/cancel'
        ]
      },
      {
        'title': 'ts-axios 更多功能实现',
        collapsable: false,
        children: [
          'chapter10/withCredentials',
          'chapter10/xsrf',
          'chapter10/upload-download',
          'chapter10/auth',
          'chapter10/validateStatus',
          'chapter10/paramsSerializer',
          'chapter10/baseURL',
          'chapter10/static'
        ]
      },
      {
        'title': 'ts-axios 单元测试',
        collapsable: false,
        children: [
          'chapter11/preface',
          'chapter11/jest',
          'chapter11/helpers',
          'chapter11/requests',
          'chapter11/headers',
          'chapter11/instance',
          'chapter11/interceptor',
          'chapter11/mergeConfig',
          'chapter11/cancel',
          'chapter11/more'
        ]
      },
      {
        'title': 'ts-axios 部署与发布',
        collapsable: false,
        children: [
          'chapter12/build-deploy',
          'chapter12/demo'
        ]
      },
      {
        'title': '课程总结',
        collapsable: false,
        children: [
          'chapter13/summary'
        ]
      }
    ]
  }
}
